#include "PlayerObjects.h"

// Method Overrides
bool CPlayerObjects::initialise(LJMUUtilShaderTexPlain* pshader, ID3D10Device* pdevice,
								std::wstring ptexfilename, int pspritewidth, int pspriteheight)
{
	// Call base Initialise Function
	return CGameObjects::initialise(pshader, pdevice, ptexfilename, pspritewidth, pspriteheight);
}
/************************************/
bool CPlayerObjects::update(float ptpf)
{
	this->_velocity += this->_accel * ptpf;

	// Call base Update Function
	return CGameObjects::update(ptpf);
}
/************************************/
bool CPlayerObjects::render(float ptpf, D3DXMATRIX pview, D3DXMATRIX portho)
{
	// Call base Render Function
	return CGameObjects::render(ptpf, pview, portho);
}
/************************************/
bool CPlayerObjects::cleanup()
{
	// Call base Cleanup Function
	return CGameObjects::cleanup();
}
/************************************/

// Public Methods
void CPlayerObjects::addVelocity(float pvelocity)
{
	this->_velocity += pvelocity;
}
/************************************/
void CPlayerObjects::addAccel(float paccel)
{
	this->_accel += paccel;
}
/************************************/
void CPlayerObjects::lostLives(int plives)
{
	this->_lives -= plives;
}
/************************************/
void CPlayerObjects::moveRight()
{
	this->setRot(0.0f);
	this->addPos(0.1f, 0.0f);
}
/************************************/
void CPlayerObjects::moveLeft()
{
	this->setRot(180.0f);
	this->addPos(-0.1f, 0.0f);
}
/************************************/
void CPlayerObjects::moveUp()
{
	this->setRot(90.0f);
	this->addPos(0.0f, 0.1f);
}
/************************************/
void CPlayerObjects::moveDown()
{
	this->setRot(270.0f);
	this->addPos(0.0f, -0.1f);
}
/************************************/